/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.teaching.entity;

import org.hibernate.validator.constraints.Length;
import java.util.List;
import com.google.common.collect.Lists;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 题目管理Entity
 * @author 王卫党
 * @version 2018-01-28
 */
public class Question extends DataEntity<Question> {
	
	private static final long serialVersionUID = 1L;
	private String content;		// 题目内容
	private String analysis;		// 问题解析
	private String ctype;		// 问题类型
	private String libraryId;		// 专题编号，对应bay_library.id
	private String no;		// 问题序号
	private String uniqueKey;		// unique_key
	private List<Answer> answerList = Lists.newArrayList();		// 子表列表
	
	public Question() {
		super();
	}

	public Question(String id){
		super(id);
	}

	@Length(min=1, max=1000, message="题目内容长度必须介于 1 和 1000 之间")
	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}
	
	@Length(min=0, max=2000, message="问题解析长度必须介于 0 和 2000 之间")
	public String getAnalysis() {
		return analysis;
	}

	public void setAnalysis(String analysis) {
		this.analysis = analysis;
	}
	
	@Length(min=0, max=10, message="问题类型长度必须介于 0 和 10 之间")
	public String getCtype() {
		return ctype;
	}

	public void setCtype(String ctype) {
		this.ctype = ctype;
	}
	
	@Length(min=0, max=11, message="id长度必须介于 1 和 11 之间")
	public String getLibraryId() {
		return libraryId;
	}

	public void setLibraryId(String libraryId) {
		this.libraryId = libraryId;
	}
	
	@Length(min=0, max=6, message="问题序号长度必须介于 0 和 6 之间")
	public String getNo() {
		return no;
	}

	public void setNo(String no) {
		this.no = no;
	}
	
	@Length(min=0, max=30, message="unique_key长度必须介于 0 和 30 之间")
	public String getUniqueKey() {
		return uniqueKey;
	}

	public void setUniqueKey(String uniqueKey) {
		this.uniqueKey = uniqueKey;
	}
	
	public List<Answer> getAnswerList() {
		return answerList;
	}

	public void setAnswerList(List<Answer> answerList) {
		this.answerList = answerList;
	}
}